package bean;

import java.util.Objects;

public class Users {
    private Integer userId;
    private String loginName;
    private String passWord;
    private String realName;

    public Users() {
    }

    public Users(Integer userId, String loginName, String passWord, String realName) {
        this.userId = userId;
        this.loginName = loginName;
        this.passWord = passWord;
        this.realName = realName;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getPassWord() {
        return passWord;
    }

    public void setPassWord(String passWord) {
        this.passWord = passWord;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    @Override
    public String toString() {
        return "Users{" +
                "userId=" + userId +
                ", loginName='" + loginName + '\'' +
                ", passWord='" + passWord + '\'' +
                ", realName='" + realName + '\'' +
                '}';
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Users users = (Users) o;
        return Objects.equals(userId, users.userId) && Objects.equals(loginName, users.loginName) && Objects.equals(passWord, users.passWord) && Objects.equals(realName, users.realName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(userId, loginName, passWord, realName);
    }
}
